package com.googlecode.astoolkit.vo {
	
	import com.googlecode.astoolkit.vo.ParamsObject;
	
	public dynamic class PathObject extends Object {
		
		private var _path:String;
		private var _pathNames:Array;
		private var _params:ParamsObject;

		public function PathObject(path:String, params:ParamsObject=null) {
			super();
			_path = path;
			_pathNames = _path.split("/");
			_params = (params) ? params : new ParamsObject(params);
		}
		
		//
		public function get path():String{
			return _path;
		}
		
		//
		public function get pathNames():Array{
			return _pathNames;
		}
		
		//
		public function get params():ParamsObject{
			return _params;
		}


		public function toString():String {
			var string:String = "[PathObject ";
			for(var i:String in this) {
				string += i + ":" + this[i] + " ";
			}
			string += "]";
			return string;
		}

	}
}